<template>
  <div class="d-item" @click="goAlbum(id)">
    <div class="img">
      <img v-lazy="img"  alt="" />
    </div>
    <div class="info">
      <div class="title">{{ title }}</div>
      <div class="des">
        {{ des }}
      </div>
      <div class="btn" v-if="countInfo">
        <span class="count mr"
          ><i class="font_family icon-shengyin_o"></i>{{ countInfo.trackCount }}人</span
        >
        <span class="count"
          ><i class="font_family icon-Headset-2"></i>{{
            countInfo.playCount | getCount
          }}</span
        >
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    id: {
      type: Number,
    },
    img: {
      type: String,
    },
    title: {
      type: String,
    },
    des: {
      type: String,
    },
    countInfo: {
      type: Object,
    },
  },
  methods: {
    

    goAlbum(id){
      
      
      this.$router.push('/album/'+id)
      
    }
  },
};
</script>

<style lang="scss" scoped>
.d-item {
  height: 94px;
  display: flex;
  .img {
    width: 94px;
    height: 94px;
    overflow: hidden;
    border-radius: 4px;
    background: url(../../assets/icon/common/img_load.png) no-repeat;
    background-size: 100% 100%;
    > img {
      width: 100%;
      height: 100%;
    }
  }
  .info {
    height: 100%;
    flex: 1;
    padding: 0 11px 0 15px;
    .title {
      width: 220px;
      color: #000000;
      font-size: 16px;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }
    .des {
      margin: 6px 0 10px;
      font-size: 13px;
      height: 34px;
      color: #999;
      display: -webkit-box;
      overflow: hidden;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }
    .btn {
      color: #999;
      font-size: 12px;
      .count {
        i {
          margin-right: 4px;
        }
      }

      .mr {
        margin-right: 14px;
      }
    }
  }
}
</style>

